import java.util.Arrays;
import java.util.Scanner;
class Rectangle{
	private int width;
	private int length;
	 
	public void setWidth(int width){
		this.width=width;
	}
	public int getWidth(){
		return width;
	}
	public void setLength(int length){
		this.length=length;
	}
	public int getLength(){
		return length;
	}
	public Rectangle(int width,int length){
		this.width=width;
		this.length=length;
	}
	@Override
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
	public int getPerimeter(int width,int length){
		return (int)(2*(width+length));
	}
	public int getArea(int width,int length){
		return (int)(width*length);
	}
	
}

class Circle{
	private int radius;
	static final double PI=Math.PI;
	public void setRadius(int radius){
		this.radius=radius;
	}
	public int getRadius(){
		return radius;
	}
	public Circle(int radius){
		this.radius=radius;
	}
	public int getPerimeter( int radius){
		return (int)(2*PI*radius);
	}
	public int getArea(int radius){

		return (int)(PI*radius*radius);
	}
	@Override
	public String toString() {
		return "Circle [radius=" + radius + "]" ;
	}
	
}

public class mai {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		Rectangle[] staff1=new Rectangle[2];
		Circle[] staff2=new Circle[2];
		int sum1=0;
		int sum2=0;
		int sum3=0;
		int sum4=0;
		for(int i=0;i<2;i++){
			staff1[i]=new Rectangle(sc.nextInt(),sc.nextInt());
			sum1+=staff1[i].getPerimeter(staff1[i].getWidth(),staff1[i].getLength());
			sum2+=staff1[i].getArea(staff1[i].getWidth(),staff1[i].getLength() );
			}
		for(int j=0;j<2;j++){
			staff2[j]=new Circle(sc.nextInt());
			sum3+=staff2[j].getPerimeter(staff2[j].getRadius());
			sum4+=staff2[j].getArea(staff2[j].getRadius());
			  
		}
		System.out.println(sum1+sum3);
		System.out.println(sum2+sum4);
		System.out.println(Arrays.deepToString(staff1));
        System.out.printf(Arrays.deepToString(staff2));      
	      
	}

}


